package merchant.service;

import java.util.Map;

import merchant.dao.ChargeDAO;
import merchant.dao.RecordOfCharge;

import com.google.gson.Gson;

import hackathon1212.ServletPojoAdapter;

public class CreateRoc extends ServletPojoAdapter {
	private static final long serialVersionUID = -7281547983457669906L;

	protected RecordOfCharge getBusinessMethod(Map<String, String[]> params){
		final String json = params.get("roc")[0];
		return ChargeDAO.get().saveROC((new Gson().fromJson(json, RecordOfCharge.class)));
	}
}
